package com.glela.activ.service.domain;

import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
 * 活动商品参数
 * @author zls
 *
 */
public class OActivProductParam {
	private long	productId;		//货品id
	private long	salePrice;		//销售价
	private long	quantity;		//数量
	private long	promotionFee;	//优惠总金额

	public long getProductId() {
		return productId;
	}

	public void setProductId(long productId) {
		this.productId = productId;
	}

	public long getSalePrice() {
		return salePrice;
	}

	public void setSalePrice(long salePrice) {
		this.salePrice = salePrice;
	}

	public long getQuantity() {
		return quantity;
	}

	public void setQuantity(long quantity) {
		this.quantity = quantity;
	}

	public long getPromotionFee() {
		return promotionFee;
	}

	public void setPromotionFee(long promotionFee) {
		this.promotionFee = promotionFee;
	}

	@Override
	public int hashCode() {
		return new HashCodeBuilder().append(productId).toHashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}
		if (obj.getClass() == this.getClass()) {
			OActivProductParam e = (OActivProductParam) obj;
			return super.equals(obj) && e.getProductId() == productId;
		}

		return super.equals(obj);
	}

}